package com.hc.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author hecai
 * @date 2021/12/7 15:10
 * 商品规格表（sku表）
 */
@ApiModel(value = "com-hc-domain-Sku")
@Getter
@Setter
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "tb_sku")
public class Sku implements Serializable {
    private static final long serialVersionUID = -6987915163412072080L;
    /**
     * 规格编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "规格编号")
    private Integer id;

    /**
     * 商品编号
     */
    @TableField(value = "spu_id")
    @ApiModelProperty(value = "商品编号")
    private Integer spuId;

    /**
     * 规格名称
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "规格名称")
    private String name;

    /**
     * 卖点
     */
    @TableField(value = "sell_point")
    @ApiModelProperty(value = "卖点")
    private String sellPoint;

    /**
     * 规格列表
     */
    @TableField(value = "specs")
    @ApiModelProperty(value = "规格列表")
    private String specs;

    /**
     * 会员价格
     */
    @TableField(value = "price1")
    @ApiModelProperty(value = "会员价格")
    private BigDecimal price1;

    /**
     * 市场价格
     */
    @TableField(value = "price2")
    @ApiModelProperty(value = "市场价格")
    private BigDecimal price2;

    /**
     * 条形码
     */
    @TableField(value = "barcode")
    @ApiModelProperty(value = "条形码")
    private String barcode;

    /**
     * 首图
     */
    @TableField(value = "img")
    @ApiModelProperty(value = "首图")
    private String img;

    /**
     * 图片列表
     */
    @TableField(value = "pics")
    @ApiModelProperty(value = "图片列表")
    private String pics;

    /**
     * 库存
     */
    @TableField(value = "amount")
    @ApiModelProperty(value = "库存")
    private Integer amount;

    /**
     * 库存预警数量
     */
    @TableField(value = "alarm_amount")
    @ApiModelProperty(value = "库存预警数量")
    private Integer alarmAmount;

    /**
     * 排序
     */
    @TableField(value = "`priority`")
    @ApiModelProperty(value = "排序")
    private Integer priority;

    /**
     * 推荐：1推荐 0 不推荐
     */
    @TableField(value = "`recommend`")
    @ApiModelProperty(value = "推荐")
    private Boolean recommend;

    /**
     * 促销：1促销 0不促销
     */
    @TableField(value = "`promotion`")
    @ApiModelProperty(value = "促销")
    private Boolean promotion;

    /**
     * 商品类型：1轮播图 2横幅 3小广告 4常规
     */
    @TableField(value = "`type`")
    @ApiModelProperty(value = "商品类型：1轮播图 2横幅 3小广告 4常规")
    private Integer type;

    /**
     * 状态 1上架  2下架
     */
    @TableField(value = "`status`")
    @ApiModelProperty(value = "状态 1上架  2下架")
    private Integer status;

    /**
     * 类别编号
     */
    @TableField(value = "`category_id`")
    @ApiModelProperty(value = "类别编号")
    private Integer categoryId;

    /**
     * 备注信息
     */
    @TableField(value = "info")
    @ApiModelProperty(value = "备注信息")
    private String info;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

}